package Com.HupochuanAdmin.Dal.Tab;

import java.util.Hashtable;
import java.util.List;
import java.util.Vector;

import Com.Hupochuan.Dal.DBManager.DBManager;
import Com.Hupochuan.Vo.SourceLanguage;

public class SourceLanguageTab {
	/*
	 * 本类私有对象
	 */
	private DBManager<SourceLanguage> dbManager = new DBManager<SourceLanguage>(SourceLanguage.class);
	
	/*
	 * 单一实例
	 */
	private SourceLanguageTab(){}
	private static SourceLanguageTab sourceLanguageTab = new SourceLanguageTab();
	public static SourceLanguageTab getObject(){
		return sourceLanguageTab;
	}
	
	/*
	 * 获得资源语言列表
	 */
	public List<SourceLanguage> findSourceLanguageList(){
		//参数部分
		List<SourceLanguage> sourceLanguageList = new Vector<SourceLanguage>();
		StringBuffer sqlBuff = new StringBuffer();
		Hashtable<String,Object> paraHash = new Hashtable<String,Object>();
		
		//sql语句部分
		sqlBuff.append(" select * from SourceLanguage ");
		sqlBuff.append(" order by weight desc,id ");
		
		//执行sql 
		sourceLanguageList = this.dbManager.querySqlReturnVoList(sqlBuff.toString(),paraHash);
		
		//返回列表
		return sourceLanguageList;
	}
}
